// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_INV_WH_LOCATION
// * CreateDate    : 2014-06-05 18:30:12
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:12
// * LastChanger   : 2014-06-05 18:30:12
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class InvWhLocationEntity : EntityBase
    {
        public InvWhLocationTable TableSchema
        {
            get
            {
                return InvWhLocationTable.Current;
            }
		}
		
		public InvWhLocationEntity()
        {

        }
		
		public InvWhLocationEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
			this.WhId = Convert.ToString(CommonFunctions.ToObject(dr["WH_ID"]));
			this.Stand = Convert.ToString(CommonFunctions.ToObject(dr["STAND"]));
			this.Location = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION"]));
			this.Volume = Convert.ToDecimal(CommonFunctions.ToObject(dr["VOLUME"]));
			this.Uv = Convert.ToString(CommonFunctions.ToObject(dr["UV"]));
			this.Area = Convert.ToDecimal(CommonFunctions.ToObject(dr["AREA"]));
			this.Ua = Convert.ToString(CommonFunctions.ToObject(dr["UA"]));
			this.IsSingle = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_SINGLE"]));
			this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
        }
		
		public InvWhLocationEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
			this.WhId = Convert.ToString(CommonFunctions.ToObject(dr["WH_ID"]));
			this.Stand = Convert.ToString(CommonFunctions.ToObject(dr["STAND"]));
			this.Location = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION"]));
			this.Volume = Convert.ToDecimal(CommonFunctions.ToObject(dr["VOLUME"]));
			this.Uv = Convert.ToString(CommonFunctions.ToObject(dr["UV"]));
			this.Area = Convert.ToDecimal(CommonFunctions.ToObject(dr["AREA"]));
			this.Ua = Convert.ToString(CommonFunctions.ToObject(dr["UA"]));
			this.IsSingle = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_SINGLE"]));
			this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return InvWhLocationTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(InvWhLocationTable.C_ID)); }
            set { SetData(InvWhLocationTable.C_ID, value); }
        }
		
        [DataMember]
        public int IsActive
        {
            get { return Convert.ToInt32(GetData(InvWhLocationTable.C_IS_ACTIVE)); }
            set { SetData(InvWhLocationTable.C_IS_ACTIVE, value); }
        }
		
        [DataMember]
        public string WhId
        {
            get { return Convert.ToString(GetData(InvWhLocationTable.C_WH_ID)); }
            set { SetData(InvWhLocationTable.C_WH_ID, value); }
        }
		
        [DataMember]
        public string Stand
        {
            get { return Convert.ToString(GetData(InvWhLocationTable.C_STAND)); }
            set { SetData(InvWhLocationTable.C_STAND, value); }
        }
		
        [DataMember]
        public string Location
        {
            get { return Convert.ToString(GetData(InvWhLocationTable.C_LOCATION)); }
            set { SetData(InvWhLocationTable.C_LOCATION, value); }
        }
		
        [DataMember]
        public decimal Volume
        {
            get { return Convert.ToDecimal(GetData(InvWhLocationTable.C_VOLUME)); }
            set { SetData(InvWhLocationTable.C_VOLUME, value); }
        }
		
        [DataMember]
        public string Uv
        {
            get { return Convert.ToString(GetData(InvWhLocationTable.C_UV)); }
            set { SetData(InvWhLocationTable.C_UV, value); }
        }
		
        [DataMember]
        public decimal Area
        {
            get { return Convert.ToDecimal(GetData(InvWhLocationTable.C_AREA)); }
            set { SetData(InvWhLocationTable.C_AREA, value); }
        }
		
        [DataMember]
        public string Ua
        {
            get { return Convert.ToString(GetData(InvWhLocationTable.C_UA)); }
            set { SetData(InvWhLocationTable.C_UA, value); }
        }
		
        [DataMember]
        public int IsSingle
        {
            get { return Convert.ToInt32(GetData(InvWhLocationTable.C_IS_SINGLE)); }
            set { SetData(InvWhLocationTable.C_IS_SINGLE, value); }
        }
		
        [DataMember]
        public string Description
        {
            get { return Convert.ToString(GetData(InvWhLocationTable.C_DESCRIPTION)); }
            set { SetData(InvWhLocationTable.C_DESCRIPTION, value); }
        }
		
		#endregion
	}
	
	
}	

